Skip to content

serialize: Remove allocations from escaping strs and indenting spaces #15419

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

erickt
Copy link
Contributor

@erickt erickt commented Jul 4, 2014

This speeds up json serialization by removing most of the allocations.

b'\n' => try!(writer.write_str("\\n")),
b'\r' => try!(writer.write_str("\\r")),
b'\t' => try!(writer.write_str("\\t")),
_ => try!(writer.write_u8(*byte)),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a lot of write calls. It would be nice if this could be written to use as few write calls as possible, in case the Writer isn't buffered.

bors added a commit that referenced this pull request Jul 5, 2014
This speeds up json serialization by removing most of the allocations.
@bors bors closed this Jul 5, 2014
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 21, 2023
Add mir lower support for tuple destructing assignment

And some other changes in mir eval
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants